package classloader;

import classloader.hotload.HotClassLoader;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

/**
 * Created by User on 2018/1/2.
 */
public class App {
    public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException {

        HotClassLoader hotClassLoader = HotClassLoader.get("");

        Class<?> HelloWorld = hotClassLoader.hotLoadClass("classloader.HelloWord");

        Method greet = HelloWorld.getMethod("greet");

        Object methodReturn = greet.invoke(HelloWorld.newInstance());

        System.out.println(methodReturn);

    }

}
